Skip to main content

Single mint

caution

V1 apis will be deprecated by 10th of Feb, 2023. Please do not use this in production. Please check V2 api

Collection of APIs to upload your assets to the IPFS and Mint them on the Polygon chain completely for free. Please follow the below steps to integrate the APIs into your DApp and start Minting through your own interface.

Base URL:

https://api.0xmint.io 
https://api.mintnft.today (Deprecated, Please don't use this in production)

Step 1: Upload to IPFS

End point:

/v1/upload/single

Request type : form-data

HeadersTypeDescription
x-api-keystringAPI key from dashboard
ParametersTypeDescription
metadataString (JSON stringified)Metadata of an NFT
imagefileThe preview image for an NFT
assetfileThe actual NFT image
info

Please refer the Opensea Metadata standards to understand how to format the metadata JSON


Example Response:

200 - Upload successfull

{
"data": {
"ipnft": "bafyreia536qt2jlndy5enqrgmzz5j5gnmqxjo6mmhcaiz7hop27a7ffidu",
"url": "ipfs://bafyreia536qt2jlndy5enqrgmzz5j5gnmqxjo6mmhcaiz7hop27a7ffidu/metadata.json"
}
}

Step 2: Initiate Mint

End point:

/v1/mint/single

Request type : application/json

HeadersTypeDescription
x-api-keystringAPI key from dashboard
ParametersTypeDescription
walletstringVerified wallet address
typestringERC721 or ERC1155
tokenCategorystringsoulbound or null
amountintegerNumber of supply for ERC1155 token type. Default value is 1
networkstring"mainnet"
tokenUristringThe token URI of the NFT to be minted

Example Request:

Request body

{
"wallet": "0x2631e5e8717fAeaD0EBa72fEd5694aD1Fa0d3581",
"type": "ERC721", //or ERC1155
"network" : "mainnet",
"amount": 1,
"tokenCategory": "soulbound", //optional (Only applicable for type ERC721)
"tokenUri" : "ipfs://bafyreid2fspss5qtp32ulvbwu37wukwzjsjrctoay32fluxcjj44kfl7fi/metadata.json"
}


Example Responses:

200 - Mint successfull

{
"message": "NFT minted successfully",
"data": {
"wallet": "0x2631e5e8717fAeaD0EBa72fEd5694aD1Fa0d3581",
"tokenURI": "ipfs://bafyreibmxnleqmexxppzboatdx3452ughqnbhbyol5ih7dqulkz6z6ljae/metadata.json",
"type": "ERC721",
"supplyCount": 1,
"network": "mainnet",
"tokenCategory": null,
"transactionHash": "0x3c367447ab2b91e14ed6936ba69051db09c239b7fccf9721827d504f0b4cbe1f",
"tokenId": "385",
"status": "CONFIRMED",
"name": "test-polygon",
"imageType": "JPEG"
}
}

If the transaction doesn't go through for more than 30 seconds, the following response will be returned with status as "PENDING"

200 - Mint Pending

{
"data": {
"wallet": "0x2631e5e8717fAeaD0EBa72fEd5694aD1Fa0d3581",
"tokenURI": "ipfs://bafyreia536qt2jlndy5enqrgmzz5j5gnmqxjo6mmhcaiz7hop27a7ffidu/metadata.json",
"type": "ERC721",
"supplyCount": 1,
"network": "mainnet",
"transactionHash": "0xf7dbd16a6a77ea68892e107543f418b854aa985b47590bcdb492f6c6d98b2dfd",
"status": "PENDING"
}
}

Step 3 (Optional): Check status of pending transactions

End point:

/v1/biconomy/{transactionHash}
{
"code": 200,
"message": "Transaction status found",
"data": {
"oldHash": "0xf607f8fa6eb1bc104732865c198ffa3c09f9b986dff262a2277392623d8847ce",
"newHash": "0xf607f8fa6eb1bc104732865c198ffa3c09f9b986dff262a2277392623d8847ce",
"oldGasPrice": "2500000009",
"newGasPrice": "2500000009",
"newStatus": "CONFIRMED",
"retryCount": 0,
"relayerAddress": "0xf571dd57639f3781cf501e0dfb4287d74a8eff63",
"code": 200,
"message": "Use this new hash to serve to your users"
}
}

info

Please find all Smart Contarct addresses for the ERC721, ERC721-Soulbound and ERC1155 below. You can use these to fetch NFTs held by various wallets by querying the chain

ERC721: https://polygonscan.com/address/0x03e055692e77e56aBf7f5570D9c64C194BA15616
ERC721-Soulbound: https://polygonscan.com/address/0x42C091743f7B73b2F0043B1fb822b63Aaa05041B
ERC1155: https://polygonscan.com/address/0xe2f50189F8c1e3804AEb854C9eBFFB92Ba9d3270